<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/3/23
  Time: 16:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>管理员管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/css/main.css">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo">管理员管理</div>

            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                        <span>${admin.name}</span>
                    </a>
                    <dl class="layui-nav-child">
                        <a href="javascript:void(0)" onclick="window.location='${pageContext.request.contextPath}/admin/out'">退出</a>
                    </dl>
                </li>
            </ul>
        </div>
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <div title="菜单缩放" class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                    <li class="layui-nav-item">
                        <a class="" href="${pageContext.request.contextPath}/admin/listUser">用户管理</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="${pageContext.request.contextPath}/admin/listNote">笔记管理</a>
                    </li>
                    <li class="layui-nav-item">
                        <a class="" href="${pageContext.request.contextPath}/admin/listCom">评论管理</a>
                    </li>

                    <li class="layui-nav-item">
                        <c:if test="${admin.type==0}">
                            <a class="" href="javascript:;">管理员</a>
                            <dl class="layui-nav-child">
                                <dd><a href="${pageContext.servletContext.contextPath}/admin/addadmin">增加普通管理员</a>
                                </dd>
                                <dd><a href="${pageContext.servletContext.contextPath}/admin/listAdm">普通管理员列表</a></dd>
                            </dl>
                        </c:if>
                        <c:if test="${admin.type==1}"><a href="javascript:;">您无权操作此选项</a></c:if>
                    </li>
<%--                    <li class="layui-nav-item"><a href="" target="_blank">)</a></li>--%>
<%--                    <li class="layui-nav-item"><a href="">开发文档</a></li>--%>
                </ul>
            </div>
        </div>
        <div class="layui-body" style="overflow: hidden;">
            <iframe src="${pageContext.request.contextPath}/admin/info" id="iframe-body"></iframe>
        </div>
        <div class="layui-footer" id="footer">
        </div>
    </div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="${pageContext.request.contextPath}/layui/layui.all.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/javascript/main.js"></script>
<script>
<%--function toadd() {--%>
<%--    var atype=$("#atype").val();--%>
<%--    if (atype==0){--%>
<%--        location.href = "${pageContext.servletContext.contextPath}/admin/addadmin";--%>
<%--    }else{--%>
<%--        alert("您没有权限操作");--%>
<%--        return false;--%>
<%--    }--%>
<%--}--%>
</script>
</html>
